Skip to main content

All Questions

1vote
1answer
238views

«Heavy» object initialization: within each thread or outside and then pass it to the threads as parameter?

Let say there is an array of strings, I have to process. I'm using a «heavy» third-part object which gets the string and performs its analysis. In order to optimize a performance, I create a number of ...
Mike's user avatar
  • 135
5votes
1answer
12kviews

Performance of sharing single object with multiple threads in Java

In Java, if I create an object that has a method to do something, and I pass that object to multiple threads which call the method, is there a performance difference from creating an individual ...
Joe's user avatar
  • 153

close